import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router/index.ts'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css';
import GlobalSidebar from './layout/GlobalSidebar.vue';
import './assets/css/global.css';

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入 Element Plus 中文语言包
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import AmountInput from './layout/components/AmountInput.vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


app.use(createPinia())
app.use(router).use(ElementPlus, { locale: zhCn })
app.component('GlobalSidebar', GlobalSidebar)
app.component('AmountInput', AmountInput)
app.mount('#app')
